package gui.components.map.objects;

import java.awt.Polygon;
import java.awt.Shape;

public class objMissile extends objProjectile {
	
	private static final long serialVersionUID = 1L;

	// Generate object
	public void GenerateShape()
	{
		Polygon _objmissile = new Polygon();
	    for (int i = 0; i < 5; i++) {
	    	_objmissile.addPoint((int) (10 + 5 * Math.cos(i * 2 * Math.PI / 5)),
	          (int) (10 + 5 * Math.sin(i * 2 * Math.PI / 5)));
	    }
	    
		_shape = _objmissile;
	}
	
	public Shape GetShape() 
	{
		GenerateShape();
		return _shape;
	}
	
	public objMissile()
	{
		SetType(objType.Projectile);
		GenerateShape();
	}
}
